import request, { downloadFile } from '@/utils/request'

const api = {
  create:'/maintenanceManagement/create',
  update:'/maintenanceManagement/update',
  delete:'/maintenanceManagement/delete',
  findBypage:'/maintenanceManagement/findByPage',
  downLoad:'/maintenanceManagement/export',
  importExcel:'/maintenanceManagement/import',
}

export default api

// export function findUserByPage (parameter) {
//   return request({
//     url: api.findUserByPage,
//     method: 'get',
//     params: parameter
//   })
// }

// 新建
export function createoperation(parameter) {
  return request({
    url: api.create,
    method: 'post',
    data: parameter
  })
}
// 更新
export function updateoperation(parameter) {
  return request({
    url: api.update,
    method: 'post',
    data: parameter
  })
}
export function deleteoperation(parameter) {
  return request({
    url: api.delete+ '?id=' + parameter,
    method: 'post',
  })
}
// 查询
export function findBypageoperation(parameter) {
  return request({
    url: api.findBypage,
    method: 'get',
    params:parameter
  })
}
export function importExceloperation(data,parameter) {
  return request({
    url: api.importExcel,
    method: 'post',
    data: data,
    params: parameter
  })
}
export function downloadoperation() {
  return downloadFile({
    url: api.downLoad,
    method: 'get',
  })
}



